<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/pages/home.xhtml">
	<ui:define name="conteudo">
		<p:tabMenu activeIndex="1">
			<p:menuitem value="Empréstimo" url="emprestimo.jsf" />
			<p:menuitem value="Leitor" url="leitor.jsf" />
			<p:menuitem value="Livro" url="livro.jsf" />
			<p:menuitem value="Autor" url="autor.jsf" />	
			<p:menuitem value="Editora" url="editora.jsf" />
			<p:menuitem value="Classificação" url="classificacao.jsf" />
		</p:tabMenu>
		<h:form>
			<p:dataTable value="#{MBLeitor.listar}" var="leitor" paginator="true"
				rows="5" paginatorPosition="bottom">

				<p:column headerText="Nome">
					<h:outputText value="#{leitor.leiNome}" />
				</p:column>
				<p:column headerText="Endereço">
					<h:outputText value="#{leitor.leiEndereco}" />
				</p:column>
				<p:column headerText="Bairro">
					<h:outputText value="#{leitor.leiBairro}" />
				</p:column>
				<p:column headerText="Cidade">
					<h:outputText value="#{leitor.leiCidade}" />
				</p:column>
				<p:column headerText="UF">
					<h:outputText value="#{leitor.leiEstado}" />
				</p:column>
				<p:column headerText="Editar" style="width: 5%;">
					<p:commandButton action="#{MBLeitor.prepararAlterar()}"
						icon="ui-icon-pencil" />
				</p:column>

			</p:dataTable>
			<center>
				<p:commandButton action="addleitor" icon="ui-icon-plus" />
				<p:commandButton action="home" icon="ui-icon-home" />
			</center>
		</h:form>
	</ui:define>
</ui:composition>
</html>